import {Injectable} from '@angular/core';

declare function i(m);

@Injectable({
  providedIn: 'root'
})
export class DataService {

  constructor() {
    this.initData();
  }
  public getData(id: string): any {
    console.log('[dataService] getData(' + id +')=' + this[id]);
    return this[id];
  }

  public setData(id: string, value: any): void {
    this[id] = value;
  }

  /******************** init ******************/

  public initData(): void {
    this['k.p.ip'] = 1;
    this['k.p.ip.ds'] = [1,2];
    this['k.p.bootstrap'] = 1;
  }


}
